extends UnitBat


func process_hit():
	if not hit_cooldown_timer.is_stopped(): return
	
	var areas = hit_area.get_overlapping_areas()
	if areas.size() <= 0: return
	
	for area in areas:
		var source = area.source
		var hit_data = get_hit_data()
		source.take_hit(hit_data, self)
	
	hit_cooldown_timer.stop()
	hit_cooldown_timer.start()
	
	# self bomb
	death()
	level.emit_particle("particle_bomb", ray_cast_point.global_position)
	level.camera.start_shake(8.0, 0.3)
	
	
	
